package com.example.demo.service.impl;

import com.example.demo.service.IndexService;
import org.example.config.LocalKafkaTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;

/**
 *
 * @author youshang
 * @date 2021/02/18 18:10
 **/
@Service
public class IndexServiceImpl implements IndexService {
    @Autowired
    private LocalKafkaTemplate kafkaTemplate;
    @Override
    public String producerIndexMessage(String record) {
//        kafkaTemplate.sendMessage(record,"success");
        return record;
    }

    @Override
    public String consumerIndexMessage(String record) {
//        String record1 = kafkaTemplate.getRecord(record);
        return "record1";
    }
}
